import { toast } from "./../toast";
function clipboardSuccess() {
  toast.success("\u590D\u5236\u6210\u529F");
}
function clipboardError() {
  toast("\u590D\u5236\u5931\u8D25");
}
const setClipboard = (txt, options) => {
  uni.setClipboardData({
    data: String(txt),
    success: () => {
      (options == null ? void 0 : options.success) ? options.success() : clipboardSuccess();
    },
    fail: (err) => {
      (options == null ? void 0 : options.error) ? options.error(err.errMsg) : clipboardError();
    }
  });
};
export {
  setClipboard
};
